package org.example.basic.day03;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

public class Demo抽象类练习2 {
    public static void main(String[] args) {

    }
}

abstract class NotifyServer {
    private String sendType;

    /**
     * 发送消息
     *
     * @param recipient 接收者
     * @param message   消息内容
     * @return
     */
    public abstract boolean send(String recipient, String message);
    public void notifyUser(User user, String content) {
        send(user.getName(), content);
    }
}


class EmailNotifier extends NotifyServer {

    @Override
    public boolean send(String recipient, String message) {
        return false;
    }
}


@Data
@NoArgsConstructor
@AllArgsConstructor
class User {
    private String name;
    private String phone;
}
